#ifndef _CONFIG_MANAGER_H_
#define _CONFIG_MANAGER_H_
#include "CCObject.h"
#include "Config.h"
//#define USE_CRC

USING_NS_CC;

class ConfigManager: public CCObject
{
public:
	
	~ConfigManager();

	static ConfigManager *			createConfigManager();
	static ConfigManager *			instance();

	bool							init();
	Config*							getConfig( const char * name );

protected:
	ConfigManager();

	static ConfigManager *			sInstance;

#ifdef USE_CRC
	typedef map<unsigned int, Config*>  ConfigTable;
#else
	typedef map<string, Config*>  ConfigTable;
#endif
	ConfigTable						m_configTable;
};

#endif